<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core" 
      >
    <h:head>

    
    </h:head>
    <h:body>
        <h:form id="formdiagnosis">

            <p:dataTable var="health" value="#{healthDiagnosys.healthingDiagnosisByPacientId()}" paginator="true" rows="10"  
                         rowKey="#{health.healingDiagnosisId}" id="tablediagnosis" emptyMessage="Нет записей"> 
             
                <p:column  >  
                    <f:facet name="header">  
                        <h:outputText value="Название" />  
                    </f:facet>  
                    <h:outputText value="#{health.diagnosisByDiagnosisId.note}"/>  
                </p:column>  
                <p:column  >  
                    <f:facet name="header">  
                        <h:outputText value="Время" />  
                    </f:facet>  
                    <h:outputText value="#{health.timestamp}"/>  
                </p:column>  
                
            </p:dataTable> 
            <p:commandButton  value="Добавить" icon="ui-icon-plus" oncomplete="diagnosis.show()"/>

            <p:dialog  header="Добавить анализ" widgetVar="diagnosis" resizable="false"  
                      width="500" showEffect="explode" hideEffect="explode">
               <h:panelGrid  columns="2" >
                    <h:outputText value="Название"/>
                    <p:selectOneMenu value="#{healthDiagnosys.sympId}" effect="fold" >  
                        <f:selectItems value="#{healthDiagnosys.getSymptom111()}" />  
                    </p:selectOneMenu>
                    <p:commandButton value="Сохранить" icon="ui-icon-disk" actionListener="#{healthDiagnosys.save()}" update="formdiagnosis:tablediagnosis" oncomplete="diagnosis.hide()"/>
                </h:panelGrid>  
            </p:dialog>  
        </h:form>

    </h:body>
</html>

